import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home',
      component: () => import('@/views/layout/layout.vue'),
      children: [
        {
          path: '/home',
          component: () => import('@/views/layout/home/home.vue'),
        },
        {
          path: '/jingjiadating',
          component: () => import('@/views/layout/jingjiadating/jingjiadating.vue'),
        },
        {
          path: '/xiangmupindao',
          component: () => import('@/views/layout/xiangmupindao/xiangmupindao.vue'),
        },
        {
          path: '/xinwenzhongxin',
          component: () => import('@/views/layout/xinwenzhongxin/xinwenzhongxin.vue'),
        },
        {
          path: '/tongzhigonggao',
          component: () => import('@/views/layout/tongzhigonggao/tongzhigonggao.vue'),
        },
        {
          path: '/bangzhuzhongxin',
          component: () => import('@/views/layout/bangzhuzhongxin/bangzhuzhongxin.vue'),
        },
        {
          path: '/guanyuwomen',
          component: () => import('@/views/layout/guanyuwomen/guanyuwomen.vue'),
        },
      ],
    },
    {
      path: '/account',
      redirect: '/login',
      component: () => import('@/views/account/account.vue'),
      children: [
        {
          path: '/login',
          component: () => import('@/views/account/login/login.vue'),
        },
        {
          path: '/register',
          component: () => import('@/views/account/register/register.vue'),
        },
        {
          path: '/changePassword',
          component: () => import('@/views/account/changePassword/changePassword.vue'),
        },
      ],
    },
  ],
})

export default router
